package com.eascs.fp.uc.server.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eascs.app.dao.PageResult;
import com.eascs.app.log.Logger;
import com.eascs.app.log.LoggerFactory;
import com.eascs.fp.common.entity.ApplyLoanEntity;
import com.eascs.fp.common.vo.ModelResult;
import com.eascs.fp.uc.dao.MemberCenterDao;
import com.eascs.fp.uc.server.MemberCenterService;

@Service
public class MemberCenterServiceImpl implements MemberCenterService{
	private Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@Autowired
	private MemberCenterDao memberCenterDao;

	@Override
	public ModelResult<PageResult<Object[]>> queryLoanApplyPage(ApplyLoanEntity entity, int pageSize, int pageIndex) {
		ModelResult<PageResult<Object[]>> modelResult = new ModelResult<PageResult<Object[]>>();
		try {
			PageResult<Object[]> pageResult = memberCenterDao.queryLoanApplyPage(entity, pageSize, pageIndex);
			modelResult.setModel(pageResult);
			return modelResult;
		} catch (Exception e) {
			logger.info("memberCenter.error.queryLoanApplyPage(),exception:{}", e.getMessage());
			return modelResult;
		}
	}

}
